<?php
namespace Api\Controller;

use Think\Controller;

class SuggestController extends CommonController
{
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 提交建议/意见反馈
     * @return [type] [description]
     */
    public function index()
    {
        $content = I('post.content', '', 'trim');

        $res = D('Api/Suggest', 'Service')->add(USER_ID, $content);
        
        if ($res) {
            success();
        } else {
            error(8025, '提交失败');
        }
    }
}
